﻿using Domain.Entitys;
using Domain.Repositorys;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EFCore.Repositorys
{
/*    public class RolesRepositoty :IRolesRepositoty
    {
        private readonly MyDbContext myDbContext;

        public RolesRepositoty(MyDbContext myDbContext)
        {
            this.myDbContext = myDbContext;
        }

        public List<Roles> GetRoles(int a, int b)
        {
            return myDbContext.Roles.ToList().Skip((a - 1) * b).Take(b).ToList();
        }

        public int GetRolesCount()
        {
            return myDbContext.Roles.ToList().Count();
        }
        /// <summary>
        /// 角色管理表添加
        /// </summary>
        /// <param name="roles"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        public async Task<int> RolesAdd(Roles roles)
        {
             await myDbContext.Roles.AddAsync(roles);
            return await myDbContext.SaveChangesAsync();
        }
    }*/
}
